package com.demo1221.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.ToString;

import javax.servlet.annotation.MultipartConfig;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionBindingListener;

@Data
@AllArgsConstructor
@ToString
public class Person implements HttpSessionBindingListener {
    @Override
    public void valueBound(HttpSessionBindingEvent event) {
        System.out.println("person 添加到HttpSession 中"+event.getName()+",value:"+event.getValue());
    }

    @Override
    public void valueUnbound(HttpSessionBindingEvent event) {
        System.out.println("person 从HttpSession 已经被移除"+event.getName()+",value:"+event.getValue());
    }

    private Integer id;
    private String name;
}
